*{
    /* 初始化 取消内外边距 */
    margin: 0;
    padding: 0;
}
body{
    /* 溢出隐藏 */
    
    overflow-x: hidden;
    overflow-y: auto;
    
}
.navbar{
    /* 相对定位 */
    position: relative;
    /* 100%窗口宽度 */
    width: 100vw;
    
    /* z-index:  10; */
}

#checkbox{
    /* 隐藏复选框 */
    display: none;
    
}

.navbar label {
    position: absolute;
    top: 0;
    /* visibility:hidden; */
    /* z-index: 11; */
    left: 0px;
    width: 100%;
    height: 43px;
    font-size: 30px;
    /* color: #5a738e; */
    background-color:rgba(0,0,0,0);
    padding-left: 6px;
    /* border: 1px solid #d9dee4; */
    cursor: pointer;
    transition: all 0.5s;
    -webkit-transition: all .5s;
    -moz-transition: all .5s;
    -ms-transition: all .5s;
    -o-transition: all .5s;

}
.navbar ul {
    list-style: none;
    width: 45px;
    height: 717px;
    background-color: #2a3f54;
    transition: all 0.5s;
    overflow: hidden;
    /* overflow-x:auto; */
}
.navbar ul li {
    height: 55px;
    margin-bottom: 10px;
}
.navbar ul li:first-child{
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}
.navbar ul li:first-child img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}
.navbar ul li:first-child span{
    color: #fff;
    /* 文字禁止换行 */
    white-space: nowrap;
    padding-left: 10px;
    /* 先把文字隐藏 */
    display: none;
}
.navbar ul li a{
    display: flex;
    justify-content: center;
    align-items: center;
    /* 垂直排列 */
    flex-direction: column;
    width: 100%;
    height: 100%;
    color: #d1d1d1;
    /* 去掉下划线 */
    text-decoration: none;
}
.navbar ul li a i {
    font-size: 15px;
    margin-bottom: 10px;
}
.navbar ul li a span{
    font-size: 6px;
    white-space: nowrap;
    visibility: hidden;
}
.navbar ul li a:hover{
    color: #fff;
    background-color: #35495d;
}
.comment{
    position: absolute;
    top: 0px;
    left: 45px;
    width: 100%;
    background-color: #152a59;
    height:fit-content;
    /* background-color: #fff; */
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* /* .navbar input:checked ~ .navbar { */
    /* left: 150px; */
    
/* } */
/* :checked选择器是判断复选框是否被选中 */
/* +是相邻兄弟选择器，找到input的下一个兄弟label */
.navbar input:checked + label {
    left: 150px;
    /* z-index:15; */
}
/* ~也是兄弟选择器，但它可以找到隔了几代的兄弟 */
.navbar input:checked ~ ul {
    width: 150px;
    /* z-index:15; */
}
.navbar input:checked ~ ul li:first-child{
    /* 将居中改为开头对齐 */
    justify-content: flex-start;
}
.navbar input:checked ~ ul li:first-child span{
    /* 文字显示 */
    display: block;
    
}
.navbar input:checked ~ ul li a{
    flex-direction: row;
    justify-content: flex-start;
}
.navbar input:checked ~ ul li a i{
    font-size: 6px;
    margin: 0 15px 0 30px;
}
.navbar input:checked ~ ul li a span{
    font-size: 6px;
    visibility: visible;
}
